<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
		<meta http-equiv="Expires" content="0">
        <meta http-equiv="Pragma" content="no-cache">
        <meta http-equiv="Cache-control" content="no-cache">
        <meta http-equiv="Cache" content="no-cache">
		<title>EACPAY|地球币节点搭建教程</title>
		<link rel="stylesheet" href="./css/iconfont.css" media="all">
		<style type="text/css">
			.head-div{
				width: 100vw;height: 12vw;text-align: center;background:-webkit-linear-gradient(top,#a7deff,#0099FF);
				
			}

			.head-text {
				font-size: 6.5vw;
				font-weight: bold;
				color: #FFF;
				line-height: 12vw;
			}

			.td-logo {
				width: 80vw;
				border-bottom: 1px solid #b6b6b6;
				height: 10vw;
				font-weight: bold;
			}

			.td-logo-dashed {
				width: 11vw;
				height: 10vw;
			}

			.td-name-dashed {
				width: 26vw;
			}

			.td-but-dashed {
				width: 16vw;
				height: 18vw;
			}
		</style>
	</head>
	<body style="margin: 0;">
		<div class="head-div">
			<span class="head-text">地球币节点搭建教程</span>

		</div>
		<div>
			<table style="font-size: 4vw;">
				<tr style="text-align: center;">
					<td class="td-logo">Ubuntu&debian安装搭建步骤</td>
				</tr>
				<tr style="text-align: left;font-size: 3.5vw;">
					<td>
						<span>
							<b>为什么要搭建节点?</b></br>
							如果认为公用地球币节点不可靠，速度不够快，可以自建节点，然后在钱包"高级设置"-->"地球币节点"中手动连接自己的节点.</br>
							1、首先购买阿里云或者腾讯云服务器，对服务器要求不高（1核/2G/50GB/1MB即可，费用99元/年），在安全组中开放35677端口;</br>
							2、用root登录操作系统，依次输入以下命令安装依赖软件，以下命令每输入一行回车执行;</span></td>
				</tr>
				<tr style="text-align: left;font-size: 3.5vw;">
					<td>
						<span>sudo apt-get update</br>
							sudo apt-get upgrade</br>
							sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev
							bsdmainutils python3 libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev
							libboost-thread-dev</br>
							sudo apt-get install software-properties-common</br>
							sudo add-apt-repository ppa:bitcoin/bitcoin</br>
							sudo apt-get update</br>
							sudo apt-get install libdb5.1-dev libdb5.1++-dev</br>
							sudo apt-get install libminiupnpc-dev</br>
							sudo apt-get install libzmq3-dev</br>
							sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev
							protobuf-compiler</span></td>
				</tr>
				<tr style="text-align: left;font-size: 3.5vw;">
					<td>
						<span>3、安装钱包源码，首先定位到home文件夹</span></br>
						git clone https://github.com/Sandokaaan/Earthcoin.git</br>
						<b>说明：如果这个不能下载，请直接到eaczg.com下载最新的源码，用sftp上传到服务器亦可</b></br>
						<span>cd Earthcoin</br>
							4、安装Berkeley DB</br>
							EARTHCOIN_ROOT=$(pwd)</br>
							BDB_PREFIX="${EARTHCOIN_ROOT}/db5"</br>
							mkdir -p $BDB_PREFIX</br>
							wget 'http://download.oracle.com/berkeley-db/db-5.1.29.NC.tar.gz'</br>
							echo '08238e59736d1aacdd47cfb8e68684c695516c37f4f</br>be1b8267dde58dc3a576c db-5.1.29.NC.tar.gz' | sha256sum -c</br>
							tar -xzvf db-5.1.29.NC.tar.gz</br>
							cd db-5.1.29.NC/build_unix/</br>
							../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX</br>
							make install</span></td>
				</tr>
				<tr style="text-align: left;font-size: 3.5vw;">
					<td><span>5、执行earthcoin源码编译</br>
							cd $EARTHCOIN_ROOT</br>
							./autogen.sh</br>
							./configure LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS=“-I${BDB_PREFIX}/include/" --disable-tests --disable-man</br>
							make</br>
							6、运行earthcoin节点</br>
							cd src</br>
							./earthcoind -daemon</br>
							7、查看earthcoin节点是否运行</br>
							./earthcoin-cli -getinfo</span></td>
				</tr>
			</table>
			<table style="font-size: 4vw;">
				<tr style="text-align: center;">
					<td class="td-logo">CentOS 8安装搭建步骤</td>
				</tr>
				<tr style="text-align: left;">
					<td><span>1、安装软件依赖</br>
							sudo yum install -y gcc-c++ git make tar wget patch epel-release bzip2 automake autoconf \
							libtool python2 python36 boost-devel openssl openssl-devel libevent-devel</span></td>
				</tr>
				<tr style="text-align: left;">
					<td><span>2、下载earthcoin源码并安装DB</br>
							cd ~</br>
							git clone https://github.com/Sandokaaan/Earthcoin.git</br>
							cd ~/Earthcoin/depends</br>
							PATH=$(echo "$PATH" | sed -e 's/:\/mnt.*//g') </br>
							make NO_QT=1</br>
							cd sources</br>
							tar -xvzf db*.NC.tar.gz</br>
							cd db*.NC</br>
							sed -i 's/__atomic_compare_exchange/__atomic_compare</br>_exchange_db/g' ./src/dbinc/atomic.h</br>
							cd build_unix</br>
							../dist/configure --prefix=/usr/local --enable-cxx</br>
							make</br>
							sudo make install</span></td>
				</tr>
				<tr style="text-align: left;">
					<td><span>3、对earthcoin源码进行编译</br>
							cd ~/Earthcoin</br>
							./autogen.sh</br>
							CONFIG_SITE=$PWD/depends/*linux*/share/config</br>.site ./configure --without-gui --disable-tests --disable-man
							--prefix=/</br>
							make</br>
							cd src</br>
							strip earthcoind</br>
							strip earthcoin-cli</br>
							strip earthcoin-tx</span></td>
				</tr>
				<tr style="text-align: left;">
					<td><span>4、运行earthcoin节点</br>
							export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:</br>/usr/local/lib"</br>
							earthcoind --daemon</br>
							5、查看earthcoin节点是否运行</br>
							earthcoin-cli -getinfo</span></td>
				</tr>
			</table>
			<table style="font-size: 4vw;">
				<tr style="text-align: center;">
					<td>FreeBSD 11安装搭建步骤</td>
				</tr>
				<tr style="text-align: left;">
					<td><span>1、安装依赖软件和下载earthcoin源码</br>
							pkg install autoconf automake boost-libs git gmake libevent libtool openssl pkgconf</br>
							git clone https://github.com/Sandokaaan/Earthcoin</span></td>
				</tr>
				<tr style="text-align: left;">
					<td><b>说明：Important: Use gmake (the non-GNU make will exit with an error).</b></td>
				</tr>
				<tr style="text-align: left;">
					<td><span>./autogen.sh</br>

							./configure # to build with wallet OR</br>
							./configure --disable-wallet # to build without wallet</span></td>
				</tr>
				<tr style="text-align: left;">
					<td><span>gmake</br>
							注意：默认安装的gdb版本太老了，不适合调试多线程的C++程序，请安装gdb程序包时候使用版本控制安装最新的版本（例如gdb7111）</span></td>
				</tr>
			</table>
			<div style="text-align: center;font-size: 3vw;color: #7e7e7e;padding-top: 10vw;">
				<span>技术支持，请联系我们：dev@eacpay.com</span>
			</div>
			<div style="font-size: 3vw;color: #7e7e7e;padding-left: 35vw;padding-top: 7vw;padding-bottom: 2vw;">
				<span style="">EACPAY版本所有©2021</span>
			</div>
		</div>
	</body>
</html>
